<script setup>
import { ref, onMounted } from 'vue';
import api from '../utils/request';

const data = ref(null);

onMounted(async () => {
  try {
    data.value = await api.get('/home/content');
  } catch (error) {
    console.error('加载数据失败', error);
  }
});
</script>

<template>
  <div>
    <h1>顺德NQI服务平台</h1>
    <pre>{{ data }}</pre>
  </div>
</template>

<style scoped>
h1 { color: #007aff; }
</style>
